-- card: 55726 from stack: in -- bmap block id: 0 -- flags: 0000 -- background id: 4755 -- name: -- part contents for background part 4 ----- text ----- C++ has many features not available in TC, while TC has a few features not available in C++. Appendix 2 details these differences. With careful coding and the use of conditional compilation, TC programs can be made to compile equally under C++. C++ does not support TC's feature to automatically prevent header file reinclusion. Thus to portably avoid reinclusion TC header files should use explicit conditional compilation*. In TC all member functions are considered 'virtual', so this keyword is not required as it is in C++. To obtain compatibility, the original declarations of all member functions (as opposed to any overriding declarations in descendant classes) should be preceded with the 'virtual' keyword. If TC is being used a macro may be used to replace 'virtual' with nothing. The following may be placed in the header for the root class (such as Generic_Class in the sample program in Chapter 4), so that the definition will be #included into all descendant classes: -- part contents for background part 6 ----- text ----- 7.4 TC/C++ Portability -- part contents for background part 7 ----- text ----- 183 -- part contents for background part 29 ----- text ----- 56532 -- part contents for background part 27 ----- text ----- Preventing file reinclusion -- part contents for background part 20 ----- text ----- Preventing file reinclusion - p182